import React from 'react';
import { CustomIconComponentProps } from '@ant-design/icons/lib/components/Icon';
import Icon from '@ant-design/icons';

interface IconFontProps extends Omit<CustomIconComponentProps, 'height' | 'width' | 'fill'> {
  name?: string;
  height?: number;
  width?: number;
  fill?: any;
}

export default function IconFont(props: IconFontProps) {
  const SvgDiv = () => {
    return (
      <svg className="m-icon" aria-hidden="true">
        <use xlinkHref={`#icon-${props.name}`} />
      </svg>
    );
  };
  return <Icon height={12} width={12} component={() => <SvgDiv />} />;
}
